#!/bin/bash
# SPDX-License-Identifier: MulanPSL-2.0+
# Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved.

. $CCI_SRC/container/defconfig.sh
. $CCI_SRC/lib/log.sh

lsmod | grep -q "^cifs\s" || {
	log_error "kernel module cifs is missing (try: sudo modprobe cifs)"
	exit 1
}

docker_rm os-cifs

cmd=(
	docker run
	-d
	-p 445:445
	-v /etc/localtime:/etc/localtime:ro
	-v /srv/os:/srv/os
	--name os-cifs
	--restart=always
	os-cifs
)

"${cmd[@]}"
